<script setup lang="ts">
//获取屏幕安全区域
const { safeAreaInsets } = uni.getSystemInfoSync()
</script>

<template>
  <view class="navbar" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
    <view class="logo">
      <image class="logo-image" src="../../../static/images/logo.png" />
      <text class="logo-text">新鲜·亲民·快捷</text>
    </view>
    <view class="search">
      <text class="icon-search">搜索商品</text>
      <text class="icon-scan"></text>
    </view>
  </view>
</template>

<style lang="scss">
.navbar {
  background-image: url(../../../static/images/navigator_bg.png);
  background-size: cover;
  padding-bottom: 16rpx;
  .logo {
    display: flex;
    margin-left: 24rpx;
    margin-bottom: 18rpx;
    .logo-image {
      height: 42rpx;
      width: 180rpx;
      padding-right: 30rpx;
    }
    .logo-text {
      font-size: 26rpx;
      color: #fff;
      letter-spacing: 6rpx;
      margin-top: 4rpx;
    }
  }
  .search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 70%;
    height: 30%;
    border-radius: 30rpx;
    background-color: #77d7ce;
    color: #fff;
    padding: 10rpx 20rpx;
    margin-left: 24rpx;
    font-size: 24rpx;
  }
}
</style>
